import util.file as RF
import util.IO as RI

if __name__ == '__main__':
    '''
    data1=RF.read('D:\BaiduNetdiskDownload\百货.csv')
    data2=RF.read('D:\BaiduNetdiskDownload\美妆.csv')
    data3=RF.read('D:\BaiduNetdiskDownload\男装.csv')
    data4=RF.read('D:\BaiduNetdiskDownload\女装.csv')
    data5=RF.read('D:\BaiduNetdiskDownload\食品.csv')
    data1.extend(data2)
    data1.extend(data3)
    data1.extend(data4)
    data1.extend(data5)
    RF.write('D:\BaiduNetdiskDownload\分榜.csv', data1)
    '''


    root1='D:\BaiduNetdiskDownload\总榜BGM人声\总榜BGM\\negative.csv'
    root2='D:\BaiduNetdiskDownload\总榜BGM人声\总榜人声\\negative.csv'
    data1=RF.read(root1)
    data2=RF.read(root2)
    for i in range(420):
        for j in range(419):
            try:
                if data1[i][0]==data2[j][0]:
                    data2[j].pop(0)
                    data1[i][len(data1[i]):len(data2[j])]=data2[j]
            except:
                break
        RI.progressBar(i,420)
    for i in range(data1.__len__()):
        print(data1[i])
    RF.write('D:\BaiduNetdiskDownload\\all.csv',data1)


